<script>

export default {
  // resolve => require.ensure([], () => resolve(require('@/views/modules/' + this.src + '.vue')))(),
  // eslint-disable-next-line vue/require-prop-types
  props: ['vueName', 'src', 'data', 'event'],
  data() {
    return {}
  },
  created() {
    this.$options.components[this.vueName] = resolve => require.ensure([], () => resolve(require('@/views/modules/' + this.src + '.vue')))
  },
  render: function(createElement, context) {
    return createElement(this.vueName, {
      props: this.data,
      on: this.event
    })
  }
}
</script>
